package com.dooioo.pns.business.service.v2;

import com.dooioo.pns.base.service.BaseService;
import com.dooioo.pns.entity.model.v2.BusinessSideUnDisturb;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 * PackageName:com.dooioo.pns.business.service.v2
 * Author: Jerry.hu
 * Create: Jerry.hu (2015-07-28 下午6:57)
 * Description:
 * To change this template use File | Settings | File Templates.
 */
@Service
public class BusinessSideUnDisturbService extends BaseService<BusinessSideUnDisturb>{

	public boolean insertInfo(BusinessSideUnDisturb businessSideUnDisturb){
		return super.insert(sqlId("insertInfo"),businessSideUnDisturb);
	}


	public boolean removeInfo(BusinessSideUnDisturb businessSideUnDisturb){
		return super.delete(sqlId("removeInfo"), businessSideUnDisturb);
	}

	public List<String> getUnDisturb(int bId,List<String> userCodes){
		Map<String,Object> map = new HashMap<>();
		map.put("bId",bId);
		map.put("userCodes",userCodes);
		return super.queryDao.getSqlSession().selectList(sqlId("getUnDisturb"),map);
	}
}
